<include file="Public:header" />
<style>
.btn-menu {
	color: #CBC8C8;
	border: #5F5F5F;
	border: thick;
}
</style>
<script>
  buildMorris = function($re) {
  var tax_data,tax_data1;
  if ($re) {
	$(".graph").html("");
  }
  tax_data=[<?php foreach($memberMonthChart as $vo){ echo '{ time:"'.$vo['time'].'",plus:'.$vo['plus'].',minus:'.$vo['minus']. '},'; } ?>];
  if ($('#hero-graph').length) {
	Morris.Line({
	  element: "hero-graph",
	  data: tax_data,
	  xkey: "time",
	  ykeys: ["plus", "minus"],
	  labels: ["加分", "扣分"],
	  lineColors: ["#44b549", "#ff5722"]
	});
  }
  tax_data1=[<?php foreach($groupMonthChart as $vo){ echo '{ time:"'.$vo['time'].'",plus:'.$vo['plus'].',minus:'.$vo['minus']. '},'; } ?>];
  if ($('#hero-graph1').length) {
	Morris.Line({
	  element: "hero-graph1",
	  data: tax_data1,
	  xkey: "time",
	  ykeys: ["plus", "minus"],
	  labels: ["加分", "扣分"],
	  lineColors: ["#44b549", "#ff5722"]
	});
  }
  if ($('#hero-bar').length) {
	Morris.Bar({
	  element: "hero-bar",
	  data: [
		<?php
			for($i=0;$i<count($departchart);$i++){
				echo('{ device:"'.$departchart[$i]['title']);
				echo('",geekbench:"'.$departchart[$i]['num']);
				echo('"}');    
				if($i!=count($departchart)-1){echo(',');}
			}
		?>
	  ],
	  xkey: "device",
	  ykeys: ["geekbench"],
	  labels: ["积分"],
	  barRatio: 0.4,
	  hideHover: "auto",
	  barColors: ["#42a5f5"]
	});
  }
  
  if ($('#hero-bar2').length) {
	Morris.Bar({
	  element: "hero-bar2",
	  data: [<?php foreach($memberRulesMonthChart as $vo){ echo('{device:"'.$vo['rulename'].'",geekbench:"'.$vo['changenum'].'"},'); } ?>],
	  xkey: "device",
	  ykeys: ["geekbench"],
	  labels: ["积分"],
	  barRatio: 0.4,
	  hideHover: "auto",
	  barColors: ["#42a5f5"]
	});
  }
};

$(function() {
  //return buildMorris();
});
</script>
<include file="Public:navgation" />
<link href="__PUBLIC__/Intesys/default/javascripts/portlet_draggable/main.css" rel="stylesheet" type="text/css">
<div class="container-fluid main-content">
  <div class="page-title chart-container">
    <div class="col-lg-12">
      <div class="alert alert-success">
        <button class="close" data-dismiss="alert" type="button">×</button>
        欢迎您，{$userInfo['name']}！
      </div>
    </div>
  </div><!--
<link href="__PUBLIC__/Intesys/default/javascripts/portlet_draggable/jquery-fallr-1.3.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__PUBLIC__/Intesys/AdminX/js/portlet_draggable/jquery-fallr-1.3.js"></script>
<script type="text/javascript" src="__PUBLIC__/Intesys/AdminX/js/portlet_draggable/jquery.easing.1.3.js"></script>-->
<script type="text/javascript" src="__PUBLIC__/Intesys/AdminX/js/portlet_draggable/Jh.js"></script>
<style>
	.widget-container.scrollable{ padding-top:0px;}
	.row > div{ min-height:200px;}
	.module-layout{margin-top: 10px;border: 2px dashed #ccc;height: 74px;text-align: center;line-height: 74px;background-color: #eee;}
</style>
  <script>
$(function(){
	//点击显示菜单
	$("#showHeader").click(function(e) {
        $("#header").toggle('fast');
    });
	Jh.Config.btnCls='';
	Jh.Config.modCls='';
	Jh.Config.texCls='';
	Jh.Config.saveUrl='{:U('Pages_layout/savePage')}';
	Jh.Config.addUrl='{:U('Pages_layout/add',['title'=>'Indexindex'])}';
	Jh.Config.pageTit='Indexindex';
	Jh.Config.mainUrl='{:__GROUP__}';
	$.getJSON('{:U('Pages_layout/getPage',['title'=>'Indexindex'])}',{},function(data){
		if(data.statu){
			Jh.fn.init(data.data,data.layout);
			Jh.Portal.init(data.data,data.layout);
		}
	});
});
</script> 
</div>
<div class="col-xs-12">
	<button id="showHeader" class="btn btn-primary"><i class="icon-edit"></i>编辑</button>
</div>
<include file="Public:footer" />